#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define mes(x) memset(x,0,sizeof(x))
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout)
#define complex Complex

int read(){
	int x = 0,sgn = 1;char ch = getchar();
	for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;
	for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);
	return x*sgn;
}

const db Pi = acos(-1);
const int MAXN = 8e5+10;

struct complex{
	db x,y;
	complex(db _x = 0.0,db _y = 0.0):x(_x),y(_y){}
	friend complex operator + (complex a,complex b){return complex(a.x + b.x , a.y + b.y);}
	friend complex operator - (complex a,complex b){return complex(a.x - b.x , a.y - b.y);}
	friend complex operator * (complex a,complex b){return complex(a.x * b.x - a.y * b.y , a.x * b.y + a.y * b.x);}
}F[MAXN],G[MAXN],Wn1[32],Wn2[32];

int rev[MAXN],lg[MAXN],n,x,a[MAXN],s[MAXN];
ll f[MAXN];

void change(complex *f,int len){
	for(int i = 1;i < len;i++) rev[i] = (rev[i>>1]>>1) | (i & 1 ? len>>1:0);
	for(int i = 1;i < len;i++) if(i < rev[i]) swap(f[i],f[rev[i]]);
}

void FFT(complex *f,int len,int on){
	change(f,len);
	for(int h = 2;h <= len;h<<=1){
		complex wn = on == 1 ? Wn1[lg[h]] : Wn2[lg[h]];
		for(int j = 0;j < len;j += h){
			complex w(1,0);
			for(int k = j;k < j + h/2;k++){
				complex u = f[k],v = f[k + h/2] * w;w = w * wn;
				f[k] = u + v,f[k + h/2] = u - v;
			}
		}
	}if(on == -1) for(int i = 0;i < len;i++) f[i].x /= len;
}

ll get(){
	ll res = 0;
	for(int i = 1,cnt = 0;i <= n + 1;i++){
		if(i == n + 1 || a[i] < x) res += 1ll * cnt * (cnt+1)/2,cnt = 0;
		else if(a[i] >= x) cnt++;
	}return res;
}

int main (){
	n = in,x = in;
	for(int i = 1;i <= n;i++) a[i] = in , s[i] = s[i-1] + (a[i] < x);
	for(int i = 1;i <= n;i++) f[s[i]]++;f[0]++;
	for(int i = 0;i <= n;i++) F[i] = complex(f[i],0);
	for(int i = 0;i <= n;i++) G[i] = complex(f[n-i],0);
	int len = 1; for(;len <= 2 * n;len<<=1);
	for(int h = 2;h <= len;h <<= 1) lg[h] = lg[h>>1] + 1,Wn1[lg[h]] = complex(cos(2*Pi/h),sin(2*Pi/h)),Wn2[lg[h]] = complex(cos(2*Pi/h),sin(-2*Pi/h));
	FFT(F,len,1);FFT(G,len,1); for(int i = 0;i < len;i++) F[i] = F[i] * G[i];
	FFT(F,len,-1); for(int i = 0;i <= n;i++) f[i] = ll(F[n-i].x + 0.5); f[0] = get();
	for(int i = 0;i <= n;i++) printf("%lld%c",f[i]," \n"[i==n]);
	return 0;
}

